/**
 * tzdesk系统平台
 * moonvip_admin
 * com.tz.service.paymentdetail
 * IPaymentdetailService.java
 * 创建人:小胡 
 * 时间：2017年01月24日 10:09:14
 *
 */
package com.tz.service.paymentdetail.impl;

import com.tz.bean.Paymentdetail;
import com.tz.bean.TzParams;
import com.tz.dao.paymentdetail.IPaymentdetailMapper;
import com.tz.service.paymentdetail.IPaymentdetailService;
import com.tz.util.TmStringUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;

/**
 * 虚拟账户明细serviceImpl
 * IPaymentdetailService
 * 创建人:小胡 
 * 时间：2017年01月24日 10:09:14
 * @version 1.0.0
 * 
 */
@Service
public class PaymentdetailServiceImpl implements IPaymentdetailService{

	@Resource
	private IPaymentdetailMapper paymentdetailMapper;
	
	@Override
	public List<HashMap<String,HashMap>> findPaymentdetails(TzParams params){
		if(TmStringUtils.isEmpty(params.getOrder()))params.setOrder("create_time desc");
		return paymentdetailMapper.findPaymentdetails(params);
	}
	
	@Override
	public int count(TzParams params) {
		return paymentdetailMapper.count(params);
	}

	@Override
	public HashMap<String ,Object> getPaymentdetail(Integer id) {
		return paymentdetailMapper.getPaymentdetail(id);
	}

	@Override
	public int save(Paymentdetail paymentdetail) {
		return paymentdetailMapper.save(paymentdetail);
	}

	@Override
	public int update(Paymentdetail paymentdetail) {
		return paymentdetailMapper.update(paymentdetail);
	}

	@Override
	public int delete(TzParams params) {
		return paymentdetailMapper.delete(params);
	}
}
